<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<%@ include file="/WEB-INF/pages/common/inc.jsp"%>
<script src="${ctxStatic}/js/jquery.min.js?v=2.1.4"></script>
<script src="${ctxStatic}/js/plugins/layer/layer.min.js"></script>
<script
	src="${ctxStatic}/js/plugins/jqgrid/i18n/grid.locale-cnffe4.js?0820"></script>
<script
	src="${ctxStatic}/js/plugins/jqgrid/jquery.jqGrid.minffe4.js?0820"></script>
</head>
<body>
	<form id="pwd" method="POST" >
	<div class="col-md-12">
		<div class="form-group">
			<label class="col-sm-3 control-label">旧密码：</label>
			<div class="col-sm-9">
				<input type="password" class="form-control" name="oldpassword"
					placeholder="请输入密码" required="required">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">新密码：</label>
			<div class="col-sm-9">
				<input type="password" class="form-control" name="newpassword1"
					placeholder="请输入新密码" required="required">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">新密码：</label>
			<div class="col-sm-9">
				<input type="password" class="form-control" name="newpassword2"
					placeholder="请再次输入" required="required">
			</div>
		</div>
	</div>
	<div align="center">
		<button type="button" class="btn btn-primary" onclick="commit()">修改</button>
	</div>
	</form>
	<script type="text/javascript">
		function commit(){
			var date =  $("#pwd").serialize();
			 $.post("${ctx}/admin/user/editpwd",date,function(data){
				alert(data);
				var index = parent.layer.getFrameIndex(window.name);
				parent.layer.close(index);
			}) 
		}
	</script>
</body>
</html>